package com.yunxi.poc.starbucks.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yunxi.poc.starbucks.entity.Tb1TransactionSale;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author shiyuan.xlc
 * @since 2021-08-09
 */
public interface Tb1TransactionSaleMapper extends BaseMapper<Tb1TransactionSale> {

    @Select("select sum(sale_item_quantity) sale_item_quantity from tb1_transaction_sale ${ew.customSqlSegment}")
    Double sumSales(@Param(Constants.WRAPPER) Wrapper wrapper);
}